package com.entity;

import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;

public class User implements HttpSessionBindingListener {
    private int id;
    private String name;
    private String pass;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    @Override
    public void valueBound(HttpSessionBindingEvent event) {
        //当 我们把 监听的对象 存放到session中的时候
        CountUser.Count++;
    }

    @Override
    public void valueUnbound(HttpSessionBindingEvent event) {
        //当 我们把 监听的对象 从session中修改 remove
        CountUser.Count--;
    }
}
